<?php


namespace Part23_CommandMode\Code4;

/**
 * 要求该命令执行这个请求
 */
class Invoker
{
    /**
     * @var Command
     */
    private $command;

    /**
     * @param $command Command
     */
    public function setCommand($command)
    {
        $this->command = $command;
    }

    public function executeCommand()
    {
        $this->command->execute();
    }
}